import Cookies from 'js-cookie'

// 存储token的键名
const TokenKey = 'vue_admin_template_token'
// 储存token时的时间戳的键名
const timeStamp = 'The time stamp'

// 获取token
export function getToken() {
  return Cookies.get(TokenKey)
}

// 获取时间戳
export function getTimeStamp() {
  return Cookies.get(timeStamp)
}

// 储存时间戳
export function setTimeStamp(time) {
  return Cookies.set(timeStamp, time)
}

// 储存token
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

// 删除token
export function removeToken() {
  return Cookies.remove(TokenKey)
}
